package com.ssy.lingxi.marketing.model.vo.coupon.request;

import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 进货单商品请求类
 * @author yzc
 * @version 2.0.0
 * @date 2021/9/1
 */
@Getter
@Setter
public class MobileGoodsCartRequest implements Serializable {

    private static final long serialVersionUID = -481618010406232709L;

    /**
     * 商城id
     */
    @NotNull(message = "商城id不能为空")
    private Long shopId;

    /**
     * 订单金额(所有商品经过活动计算后总金额)
     */
    @NotNull(message = "订单金额不能为空")
    private BigDecimal orderAmount;

    /**
     * 店铺商品集合
     */
    @Valid
    @NotEmpty(message = "店铺商品集合不能为空")
    private List<StoreGoods> goodsList;

    @Getter
    @Setter
    public static class StoreGoods {
        /**
         * 店铺会员id
         */
        @NotNull(message = "店铺会员id不能为空")
        private Long memberId;

        /**
         * 店铺角色id
         */
        @NotNull(message = "店铺角色id不能为空")
        private Long roleId;

        /**
         * skuId
         */
        @NotEmpty(message = "skuId不能为空")
        private List<Long> skuIdList;
    }
}
